import request from "@/utils/request";

//发货单明细
export function getDeliveryDetail(data){
  return request({
    url: "/delivery/getDeliveryDetail",
    method: "get",
    params: data,
  });
}

// 发货单列表
export function getDeliveryList(data) {
  return request({
    url: "/delivery/list",
    method: "post",
    data,
  });
}
// 发货单新增
export function addDeliveryList(data) {
  return request({
    url: "/delivery/add",
    method: "post",
    data,
  });
}
// 发货单获取详情
export function getDeliveryById(data) {
  return request({
    url: "/delivery/getById",
    method: "post",
    data,
  });
}
// 发货单删除
export function delDeliveryById(data) {
  return request({
    url: "/delivery/deleteById",
    method: "post",
    data,
  });
}
// 发货单修改状态
export function updateStatus(data) {
  return request({
    url: "/delivery/updateStatus",
    method: "post",
    data,
  });
}
//发货单导出
export const deliveryExport = (data) => {
  return request({
    url: "/delivery/export",
    method: "post",
    data,
    responseType: "blob",
  });
};

//发货单明细列表
export function getdeliverydetailsList(query) {
  return request({
    url: "/delivery/detailslist",
    method: 'get',
    params: query
  })
}